<template>
    <div class="header">
        <div class="header-left">
            <span class="iconfont">
                &#xe660;
            </span>
        </div>
        <div class="header-search">
            <span class="iconfont">
                &#xe600;
            </span>
            输入城市/城市/游玩主题
        </div>
        <div class="header-right" @click="toCity">
            
            {{city}}
            <span class="iconfont">
                &#xe601;
            </span>
            
        </div>
    </div>
</template>
<script>
import {mapState} from "vuex"
export default {
    methods:{
        toCity(){
            this.$router.push("/city")
        }
    },
    computed:{
        ...mapState(['city'])
    }
}
</script>
<style  scoped >

.header{
width: 100%;
line-height: .88rem;
background: #21cde1;
color: #fff;
font-size: .36rem;
display: flex;

}
.header-search{
    flex:2;
    background: #fff;
    height: .6rem;
    margin: .15rem 0;
    border-radius: .1rem;
    color: #e4e7ea;
    line-height: .6rem;
    padding-left: .2rem;
    font-size: .28rem;

}
.header-left{
    width: .4rem;
    padding: 0 .2rem;
    text-align: center;
    font-weight: bold;
}
.header-right{
    font-size: .28rem;
    padding: 0 .2rem;
    cursor:pointer
}
.header-right a{
    color: #fff;
}
</style>